<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: tBuffer</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tBuffer<div class="ingroups"><a class="el" href="group__sampling.html">Sampling</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Buffer for use in Sampler objects.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga91d93789b64c9306b30933c5e8d001fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga91d93789b64c9306b30933c5e8d001fd">tBuffer_init</a> (tBuffer *const, uint32_t length, <a class="el" href="struct_l_e_a_f.html">LEAF</a> *const leaf)</td></tr>
<tr class="memdesc:ga91d93789b64c9306b30933c5e8d001fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tBuffer to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance.  <a href="group__tbuffer.html#ga91d93789b64c9306b30933c5e8d001fd">More...</a><br /></td></tr>
<tr class="separator:ga91d93789b64c9306b30933c5e8d001fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad24562bae9e5411aa917bee6f27d4153"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#gad24562bae9e5411aa917bee6f27d4153">tBuffer_initToPool</a> (tBuffer *const sb, uint32_t length, tMempool *const mp)</td></tr>
<tr class="memdesc:gad24562bae9e5411aa917bee6f27d4153"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tBuffer to a specified mempool.  <a href="group__tbuffer.html#gad24562bae9e5411aa917bee6f27d4153">More...</a><br /></td></tr>
<tr class="separator:gad24562bae9e5411aa917bee6f27d4153"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7addef34b26a9464a59f023d690ec04"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#gaa7addef34b26a9464a59f023d690ec04">tBuffer_free</a> (tBuffer *const)</td></tr>
<tr class="memdesc:gaa7addef34b26a9464a59f023d690ec04"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a tBuffer from its mempool.  <a href="group__tbuffer.html#gaa7addef34b26a9464a59f023d690ec04">More...</a><br /></td></tr>
<tr class="separator:gaa7addef34b26a9464a59f023d690ec04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadad3503c475071c5240b37c768f64be2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#gadad3503c475071c5240b37c768f64be2">tBuffer_tick</a> (tBuffer *const, float sample)</td></tr>
<tr class="memdesc:gadad3503c475071c5240b37c768f64be2"><td class="mdescLeft">&#160;</td><td class="mdescRight">If recording, add a sample to the buffer. Otherwise do nothing.  <a href="group__tbuffer.html#gadad3503c475071c5240b37c768f64be2">More...</a><br /></td></tr>
<tr class="separator:gadad3503c475071c5240b37c768f64be2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga73438e2159fac7b67563b1009ca9c7f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga73438e2159fac7b67563b1009ca9c7f6">tBuffer_read</a> (tBuffer *const, float *buff, uint32_t len)</td></tr>
<tr class="memdesc:ga73438e2159fac7b67563b1009ca9c7f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read an input buffer into the buffer.  <a href="group__tbuffer.html#ga73438e2159fac7b67563b1009ca9c7f6">More...</a><br /></td></tr>
<tr class="separator:ga73438e2159fac7b67563b1009ca9c7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69d5397829f174b81a621170367a8550"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga69d5397829f174b81a621170367a8550">tBuffer_get</a> (tBuffer *const, int idx)</td></tr>
<tr class="memdesc:ga69d5397829f174b81a621170367a8550"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the sample recorded at a given position in the buffer.  <a href="group__tbuffer.html#ga69d5397829f174b81a621170367a8550">More...</a><br /></td></tr>
<tr class="separator:ga69d5397829f174b81a621170367a8550"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga55baf7685651fd7f9926dc0ed5b2d73b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga55baf7685651fd7f9926dc0ed5b2d73b">tBuffer_record</a> (tBuffer *const)</td></tr>
<tr class="memdesc:ga55baf7685651fd7f9926dc0ed5b2d73b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start recording samples into the buffer.  <a href="group__tbuffer.html#ga55baf7685651fd7f9926dc0ed5b2d73b">More...</a><br /></td></tr>
<tr class="separator:ga55baf7685651fd7f9926dc0ed5b2d73b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9fcb0f6e0fb037edf1146a3983d8424d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga9fcb0f6e0fb037edf1146a3983d8424d">tBuffer_stop</a> (tBuffer *const)</td></tr>
<tr class="memdesc:ga9fcb0f6e0fb037edf1146a3983d8424d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop recordings samples into the buffer.  <a href="group__tbuffer.html#ga9fcb0f6e0fb037edf1146a3983d8424d">More...</a><br /></td></tr>
<tr class="separator:ga9fcb0f6e0fb037edf1146a3983d8424d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7ff30c7c2c6de87ed61c8025620429f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#gaa7ff30c7c2c6de87ed61c8025620429f">tBuffer_getRecordPosition</a> (tBuffer *const)</td></tr>
<tr class="memdesc:gaa7ff30c7c2c6de87ed61c8025620429f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the recording position, from where the buffer will next add samples.  <a href="group__tbuffer.html#gaa7ff30c7c2c6de87ed61c8025620429f">More...</a><br /></td></tr>
<tr class="separator:gaa7ff30c7c2c6de87ed61c8025620429f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga893981a1b088cb6cd43359f869069689"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga893981a1b088cb6cd43359f869069689">tBuffer_setRecordPosition</a> (tBuffer *const, int pos)</td></tr>
<tr class="memdesc:ga893981a1b088cb6cd43359f869069689"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the recording position, from where the buffer will next add samples.  <a href="group__tbuffer.html#ga893981a1b088cb6cd43359f869069689">More...</a><br /></td></tr>
<tr class="separator:ga893981a1b088cb6cd43359f869069689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga22b4855b2f2e94a7f870de419b3c3c84"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga22b4855b2f2e94a7f870de419b3c3c84">tBuffer_setRecordMode</a> (tBuffer *const, RecordMode mode)</td></tr>
<tr class="memdesc:ga22b4855b2f2e94a7f870de419b3c3c84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the recording mode.  <a href="group__tbuffer.html#ga22b4855b2f2e94a7f870de419b3c3c84">More...</a><br /></td></tr>
<tr class="separator:ga22b4855b2f2e94a7f870de419b3c3c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga39fb5d9d5ed963390e45322a2a97a1f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga39fb5d9d5ed963390e45322a2a97a1f1">tBuffer_clear</a> (tBuffer *const)</td></tr>
<tr class="memdesc:ga39fb5d9d5ed963390e45322a2a97a1f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the buffer.  <a href="group__tbuffer.html#ga39fb5d9d5ed963390e45322a2a97a1f1">More...</a><br /></td></tr>
<tr class="separator:ga39fb5d9d5ed963390e45322a2a97a1f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79955880600cfd3ec722b7110a4aab33"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga79955880600cfd3ec722b7110a4aab33">tBuffer_getBufferLength</a> (tBuffer *const)</td></tr>
<tr class="memdesc:ga79955880600cfd3ec722b7110a4aab33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of the buffer.  <a href="group__tbuffer.html#ga79955880600cfd3ec722b7110a4aab33">More...</a><br /></td></tr>
<tr class="separator:ga79955880600cfd3ec722b7110a4aab33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa68440f784cd947e6bb4eb00cd6473b5"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#gaa68440f784cd947e6bb4eb00cd6473b5">tBuffer_getRecordedLength</a> (tBuffer *const sb)</td></tr>
<tr class="memdesc:gaa68440f784cd947e6bb4eb00cd6473b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the length of recorded audio in the buffer.  <a href="group__tbuffer.html#gaa68440f784cd947e6bb4eb00cd6473b5">More...</a><br /></td></tr>
<tr class="separator:gaa68440f784cd947e6bb4eb00cd6473b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28a6063f2d763e4ba9414c797c1884b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga28a6063f2d763e4ba9414c797c1884b4">tBuffer_setRecordedLength</a> (tBuffer *const sb, int length)</td></tr>
<tr class="memdesc:ga28a6063f2d763e4ba9414c797c1884b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the length of what is considered recorded audio in the buffer.  <a href="group__tbuffer.html#ga28a6063f2d763e4ba9414c797c1884b4">More...</a><br /></td></tr>
<tr class="separator:ga28a6063f2d763e4ba9414c797c1884b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga37ffab4845668d588eac944f4adb1f65"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tbuffer.html#ga37ffab4845668d588eac944f4adb1f65">tBuffer_isActive</a> (tBuffer *const sb)</td></tr>
<tr class="memdesc:ga37ffab4845668d588eac944f4adb1f65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the buffer is recording.  <a href="group__tbuffer.html#ga37ffab4845668d588eac944f4adb1f65">More...</a><br /></td></tr>
<tr class="separator:ga37ffab4845668d588eac944f4adb1f65"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Buffer for use in Sampler objects. </p>
<p>Buffer for use in Sampler objects. Can selectively record audio and keeps track of the length of recorded audio. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga91d93789b64c9306b30933c5e8d001fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga91d93789b64c9306b30933c5e8d001fd">&#9670;&nbsp;</a></span>tBuffer_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_init </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_e_a_f.html">LEAF</a> *const&#160;</td>
          <td class="paramname"><em>leaf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tBuffer to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the tBuffer to initialize. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the buffer in samples. </td></tr>
    <tr><td class="paramname">leaf</td><td>A pointer to the leaf instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad24562bae9e5411aa917bee6f27d4153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad24562bae9e5411aa917bee6f27d4153">&#9670;&nbsp;</a></span>tBuffer_initToPool()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_initToPool </td>
          <td>(</td>
          <td class="paramtype">tBuffer *const&#160;</td>
          <td class="paramname"><em>sb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tMempool *const&#160;</td>
          <td class="paramname"><em>mp</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tBuffer to a specified mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the tBuffer to initialize. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the buffer in samples. </td></tr>
    <tr><td class="paramname">mempool</td><td>A pointer to the tMempool to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa7addef34b26a9464a59f023d690ec04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa7addef34b26a9464a59f023d690ec04">&#9670;&nbsp;</a></span>tBuffer_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_free </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a tBuffer from its mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the tBuffer to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gadad3503c475071c5240b37c768f64be2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadad3503c475071c5240b37c768f64be2">&#9670;&nbsp;</a></span>tBuffer_tick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_tick </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>sample</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If recording, add a sample to the buffer. Otherwise do nothing. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">input</td><td>The input sample. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga73438e2159fac7b67563b1009ca9c7f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga73438e2159fac7b67563b1009ca9c7f6">&#9670;&nbsp;</a></span>tBuffer_read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_read </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read an input buffer into the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">inputBuffer</td><td>The input buffer. </td></tr>
    <tr><td class="paramname">length</td><td>The length of the input buffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga69d5397829f174b81a621170367a8550"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69d5397829f174b81a621170367a8550">&#9670;&nbsp;</a></span>tBuffer_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float tBuffer_get </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the sample recorded at a given position in the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">position</td><td>The position to get a sample from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The recorded sample. </dd></dl>

</div>
</div>
<a id="ga55baf7685651fd7f9926dc0ed5b2d73b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga55baf7685651fd7f9926dc0ed5b2d73b">&#9670;&nbsp;</a></span>tBuffer_record()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_record </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start recording samples into the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga9fcb0f6e0fb037edf1146a3983d8424d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9fcb0f6e0fb037edf1146a3983d8424d">&#9670;&nbsp;</a></span>tBuffer_stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_stop </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop recordings samples into the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaa7ff30c7c2c6de87ed61c8025620429f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa7ff30c7c2c6de87ed61c8025620429f">&#9670;&nbsp;</a></span>tBuffer_getRecordPosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tBuffer_getRecordPosition </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the recording position, from where the buffer will next add samples. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The recording position. </dd></dl>

</div>
</div>
<a id="ga893981a1b088cb6cd43359f869069689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga893981a1b088cb6cd43359f869069689">&#9670;&nbsp;</a></span>tBuffer_setRecordPosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_setRecordPosition </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the recording position, from where the buffer will next add samples. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">index</td><td>The new recording position. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga22b4855b2f2e94a7f870de419b3c3c84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga22b4855b2f2e94a7f870de419b3c3c84">&#9670;&nbsp;</a></span>tBuffer_setRecordMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_setRecordMode </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RecordMode&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the recording mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">mode</td><td>The new mode, either RecordOneShot to record one buffer length or RecordLoop to record on loop, overwriting old samples. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga39fb5d9d5ed963390e45322a2a97a1f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga39fb5d9d5ed963390e45322a2a97a1f1">&#9670;&nbsp;</a></span>tBuffer_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_clear </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga79955880600cfd3ec722b7110a4aab33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga79955880600cfd3ec722b7110a4aab33">&#9670;&nbsp;</a></span>tBuffer_getBufferLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t tBuffer_getBufferLength </td>
          <td>(</td>
          <td class="paramtype">tBuffer * const&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the length of the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length of the buffer. </dd></dl>

</div>
</div>
<a id="gaa68440f784cd947e6bb4eb00cd6473b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa68440f784cd947e6bb4eb00cd6473b5">&#9670;&nbsp;</a></span>tBuffer_getRecordedLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t tBuffer_getRecordedLength </td>
          <td>(</td>
          <td class="paramtype">tBuffer *const&#160;</td>
          <td class="paramname"><em>sb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the length of recorded audio in the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The length in samples of recorded audio. </dd></dl>

</div>
</div>
<a id="ga28a6063f2d763e4ba9414c797c1884b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga28a6063f2d763e4ba9414c797c1884b4">&#9670;&nbsp;</a></span>tBuffer_setRecordedLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tBuffer_setRecordedLength </td>
          <td>(</td>
          <td class="paramtype">tBuffer *const&#160;</td>
          <td class="paramname"><em>sb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the length of what is considered recorded audio in the buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
    <tr><td class="paramname">length</td><td>The new recorded length. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga37ffab4845668d588eac944f4adb1f65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga37ffab4845668d588eac944f4adb1f65">&#9670;&nbsp;</a></span>tBuffer_isActive()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tBuffer_isActive </td>
          <td>(</td>
          <td class="paramtype">tBuffer *const&#160;</td>
          <td class="paramname"><em>sb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the buffer is recording. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sampler</td><td>A pointer to the relevant tBuffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if recording, 0 if not. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
